<div class="popup" style="width:400px;">
	<div class="header">
		<i class="icon_w icon_circle"></i>
		创建圈子
		<i class="icon_w icon_close" style="float:right; cursor:pointer;" onclick="UM_LAYER.close();"></i>
	</div>
	<div class="content" id="show_circle_add">
		<div style="margin-bottom:10px;">
			<input class="input" type="text" id="new_circle_title" name="new_circle_title" style="width:200px;" maxlength="20">
		</div>
		<div style="margin-bottom:20px;">
			<input type="radio" id="new_circle_privacy" name="new_circle_privacy" value="public" checked>公开
			<input type="radio" id="new_circle_privacy" name="new_circle_privacy" value="private">私密
		</div>
		<div style="text-align:right;">
			<button class="submit" onclick="add_circle()">创建</button>
			<button class="cancel" onclick="UM_LAYER.close();">取消</button>
		</div>
		<script type="text/javascript">
		function add_circle () {
			var t 		= $('#new_circle_title').val();
			var p 		= $('#new_circle_privacy:checked').val();
			
			var result = $('#show_circle_add');
			if (t) {
				t = encodeURIComponent(t);
				result.html('操作中...');
				loadMod('circle/action_add', {'circle_title':t, 'circle_privacy':p}, '', function (msg) {
					if (msg == 'true') {
						UM_LAYER.close();
						location.href = location.href;
					} else {
						result.html('操作失败！');
					}
				} );
			} else {
				alert('请填写圈子名称！');
			} 
		}
		</script>
	</div>
</div>
